package com.huirui.server.pojo.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

@Data
@Schema(description = "产品详情VO")
public class ProductDetailedVo {
    @Schema(description = "产品ID")
    private Long productId;

    @Schema(description = "商品状态")
    private Integer productStatus;

    @Schema(description = "产品轮播图")
    private List<String> productCarouselImages;

    @Schema(description = "产品详情图")
    private List<String> productDetailedImages;

    @Schema(description = "产品划线价格")
    private BigDecimal originalPrice;

    @Schema(description = "产品售价")
    private BigDecimal discountPrice;

    @Schema(description = "促销价格")
    private BigDecimal promotionalPrice;

    @Schema(description = "产品类型")
    private Integer productType;

    @Schema(description = "产品名称")
    private String productName;

    @Schema(description = "产品提示")
    private String productTip;

    @Schema(description = "生产企业")
    private String manufacturingEnterprise;

    @Schema(description = "商品包装")
    private String productPackaging;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @Schema(description = "生产日期")
    private LocalDate manufacturingDate;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @Schema(description = "过期日期")
    private LocalDate expiryDate;

    @Schema(description = "医保编码")
    private String medicalInsuranceCode;

    @Schema(description = "注册号")
    private String registrationNumber;

    @Schema(description = "注册证照片")
    private String registrationIdPhoto;

    @Schema(description = "品牌ID")
    private Long brandId;

    @Schema(description = "品牌名称")
    private String brandName;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Schema(description = "秒杀开始时间")
    private LocalDateTime seckillStartTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Schema(description = "秒杀结束时间")
    private LocalDateTime seckillEndTime;

    @Schema(description = "距离秒杀结束还剩多少毫秒")
    private Long seckillEndRemainingMillis;

    @Schema(description = "已抢占比")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "0.00")
    private BigDecimal snappedUpRate;

    @Schema(description = "可用库存")
    private Long availableStock;

    @Schema(description = "总库存")
    private Long totalStock;

    @Schema(description = "产品规格")
    private List<ProductSpecificationDetailedVo> productSpecification;
}
